package com.mostromas.ess.product.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mostromas.ess.entities.ProductSize;
import com.mostromas.ess.entities.ProductYear;
import com.mostromas.ess.product.mapper.ProductYearMapper;
import com.mostromas.ess.product.service.IProductYearService;
import com.mostromas.ess.util.base.Result;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProductYearServiceImpl extends ServiceImpl<ProductYearMapper, ProductYear> implements IProductYearService {
    @Override
    public Result selectAll() {
        QueryWrapper<ProductYear> wrapper = new QueryWrapper<>();
        wrapper.orderByAsc("sort");
        List<ProductYear> data = baseMapper.selectList(wrapper);
        return Result.ok(data);
    }
}
